package cn.com.pc.content.domain;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 内容业务
 */
public enum App {

    CMS("cms", "采编发系统"),
    PGC("pgc", "麻雀系统"),
    HM("hm", "行家系统"),
    PcbabyBbs("pcbaby_bbs", "亲子论坛"),
    PcbabyKw("pcbaby_kw", "亲子快问"),
    PcbabyLable("pcbaby_lable", "亲子视频");

    private String name;
    private String fullname;

    App(String name, String fullname) {
        this.name = name;
        this.fullname = fullname;
    }

//    @JsonCreator
    public static App getSourceByName(String name){
        for(App app : values()){
            if(app.getName().equals(name)){
                return app;
            }
        }
        return null;
    }

//    @JsonValue
    public String getName() {
        return name;
    }

    public String getFullname() {
        return fullname;
    }
}
